from keras.models import Sequential
from keras.layers import Dense, Activation

model = Sequential([
    Dense(32, input_shape=(784,)),
    Activation('relu'),
    Dense(10),
    Activation('softmax'), ])
# 或
# model = Sequential()
# model.add(Dense(32, input_dim=784))
# model.add(Activation('relu'))
# 打印网络结构
summary = model.summary()
print(summary)
